<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ page import="com.zmx.holiday.user.model.*"%>
<%String menu="5"; %>
<%@ include file="/head.jsp" %>
<div id="main">
		<div id="main_banner"></div>
		<div id="left">
			<%@ include file="/user/user_left.jsp" %>
			<div id="reg_right">
				<div class="title"><h3>用户信息</h3></div>
				<div class="info-words bottom">
				<s:form action="passUpdate" namespace="/user" validate="true" theme="simple" method="post"  >
					<table border="0" cellspacing="1" cellpadding="0">
	                    <tr>
	                      <th>旧密码：</th>
	                      <td><s:password name="oldPass" id="old"/><font color=red><s:fielderror><s:param>oldPass</s:param></s:fielderror></font></td>
	                    </tr>
	                    <tr>
	                      <th>新密码：</th>
	                      <td><s:password name="newPass" id="new1"/><s:fielderror><s:param>newPass</s:param></s:fielderror></td>
	                    </tr>
	                    <tr>
	                      <th>重复新密码：</th>
	                      <td><s:password name='newPassAgain' id="new2"/><s:fielderror><s:param>newPassAgain</s:param></s:fielderror></td>
	                    </tr>
	                 </table>
	                 <input type="hidden" name="userID" value="<%=userID %>"/>
	                 <script type="text/javascript">
	                 	function check(){
	                 		var olda=document.getElementById("old");
	                 		var newa=document.getElementById("new1");
	                 		var newb=document.getElementById("new2");
	                 		if(olda.value==""){
	                 			alert("旧密码不能为空!");
	                 		}else if(newa.value==""){
	                 			alert("新密码不能为空!");
	                 		}else if(newb.value==""){
	                 			alert("请再次输入新密码!");
	                 		}else if(newa.value!=newb.value){
	                 			alert("两次输入的新密码不一样，请重新输入!");
	                 		}else{
	                 			passUpdate.submit();
	                 		}
	                 	}
	                 </script>
	                 <div class="caozuo">
						<a href="javascript:check();">修改信息</a>
						<a href="javascript:passUpdate.reset();">重新填写</a>
					</div>
	                </s:form>
				</div>
			</div>
		</div>	
		<%@ include file="/integration/list_right.jsp" %>
</div>
<%@ include file="/foot.jsp" %>